package com.rain.rainspringboot3.desensitize.core.regex.handler;


import com.rain.rainspringboot3.desensitize.core.regex.annotation.EmailDesensitize;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * {@link EmailDesensitize} 的脱敏处理器
 *
 * @author gaibu
 */
@Component
public class EmailDesensitizationHandler extends AbstractRegexDesensitizationHandler<EmailDesensitize> {

    @Override
    String getRegex(EmailDesensitize annotation) {
        return annotation.regex();
    }

    @Override
    String getReplacer(EmailDesensitize annotation) {
        return annotation.replacer();
    }

    @Override
    public Map<String, String> getPrefixAndSuffix(String origin, EmailDesensitize annotation) {
        return null;
    }
}
